home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / bbs / mfm_111b.zip / ADOPTINS.PAS next >
Pascal/Delphi Source File  |  1992-01-07  |  3KB  |  76 lines

  1. {========================================================================}
  2. Procedure AdoptAbandon(Display : Byte);
  3.   Begin
  4.     Altered := True;
  5.     Case CurrentEntry^.TypeOfRecord Of
  6.       Orphan :
  7.       Begin
  8.         CurrentEntry^.TypeOfRecord := FileRecord;
  9.         NextPrintEntry := CurrentEntry;
  10.         If Display = 1 Then
  11.         Begin
  12.           DisplayRecord(Row); DisplayCurrentLocation;
  13.         End;
  14.       End;
  15.       FileRecord :
  16.       Begin
  17.         CurrentEntry^.TypeOfRecord := Orphan;
  18.         NextPrintEntry := CurrentEntry;
  19.         DisplayRecord(Row); DisplayCurrentLocation;
  20.       End;
  21.       Comment :
  22.       Begin
  23.         CurrentEntry^.TypeOfRecord := Offline;
  24.         CurrentEntry^.Description := LtrimRtrim(CurrentEntry^.Description);
  25.         CurrentEntry^.FileName := Copy(CurrentEntry^.Description,1,Pos(' ',CurrentEntry^.Description)-1);
  26.         CurrentEntry^.Description := Copy(CurrentEntry^.Description,Pos(' ',CurrentEntry^.Description)+1,79);
  27.         NextPrintEntry := CurrentEntry;
  28.         DisplayRecord(Row); DisplayCurrentLocation;
  29.       End;
  30.       Offline :
  31.       Begin
  32.         CurrentEntry^.TypeOfRecord := Comment;
  33.         CurrentEntry^.Description := CurrentEntry^.FileName+' '+CurrentEntry^.Description;
  34.         CurrentEntry^.FileName := '';
  35.         NextPrintEntry := CurrentEntry;
  36.         DisplayRecord(Row); DisplayCurrentLocation;
  37.       End;
  38.     End;
  39.   End;
  40. {========================================================================}
  41. Procedure AdoptAllOrphans;
  42.   Begin
  43.     OldEntry := CurrentEntry;
  44.     CurrentEntry := FirstEntry;
  45.     Repeat
  46.       If (CurrentEntry^.FileName <> 'FILES.BBS') And
  47.          (CurrentEntry^.FileName <> 'FILES.BAK') And
  48.          (CurrentEntry^.TypeOfRecord = Orphan) Then AdoptAbandon(0);
  49.       CurrentEntry := CurrentEntry^.NextEntry;
  50.     Until CurrentEntry = NIL;
  51.     CurrentEntry := OldEntry;
  52.     DisplayScreen;
  53.   End;
  54. {========================================================================}
  55. Procedure InsertBlank;
  56.   Begin
  57.     If MaxAvail > SizeOf(ListRecord) Then
  58.     Begin
  59.       Altered := True;
  60.       New(NewEntry);
  61.       NewEntry^.PrevEntry := CurrentEntry^.PrevEntry;
  62.       NewEntry^.NextEntry := CurrentEntry;
  63.       CurrentEntry^.PrevEntry^.NextEntry := NewEntry;
  64.       CurrentEntry^.PrevEntry := NewEntry;
  65.       If CurrentEntry = TopEntry Then TopEntry := NewEntry;
  66.       If CurrentEntry = FirstEntry Then FirstEntry := NewEntry;
  67.       CurrentEntry := NewEntry;
  68.       CurrentEntry^.TypeOfRecord := Comment;
  69.       CurrentEntry^.Description := ' ';
  70.       CurrentEntry^.Tagged := False;
  71.       Inc(NumberOfEntries);
  72.       DisplayScreen;
  73.     End;
  74.   End;
  75. {========================================================================}
  76.